notebook: Remove "active-page" class
authorBenjamin Otte <otte@redhat.com>
Mon, 7 Sep 2015 10:26:33 +0000 (12:26 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Oct 2015 14:42:48 +0000 (16:42 +0200)
Instead, just use the "tab:active" selector

gtk/gtknotebook.c
gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css
gtk/theme/HighContrast/_common.scss
gtk/theme/HighContrast/gtk.css

index abeeba13bf36359aa6dec042c7b7df9398437c4c..8233251cbe97a46fad65daf1ff13dd8850dbc49a 100644 (file)
@@ -4970,9 +4970,6 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
 
   if (priv->cur_page == list->data)
     {
-      if (priv->cur_page->tab_label)
-       gtk_style_context_remove_class (gtk_widget_get_style_context (priv->cur_page->tab_label),
-                                       "active-page");
       priv->cur_page = NULL;
       if (next_list && !destroying)
         gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (next_list));
@@ -6631,17 +6628,11 @@ gtk_notebook_real_switch_page (GtkNotebook     *notebook,
       gtk_widget_set_child_visible (priv->cur_page->child, FALSE);
       gtk_css_node_set_state (priv->cur_page->cssnode,
                               gtk_css_node_get_state (priv->cur_page->cssnode) & ~GTK_STATE_FLAG_ACTIVE);
-      if (priv->cur_page->tab_label)
-       gtk_style_context_remove_class (gtk_widget_get_style_context (priv->cur_page->tab_label),
-                                       "active-page");
     }
 
   priv->cur_page = page;
   gtk_css_node_set_state (page->cssnode,
                           gtk_css_node_get_state (page->cssnode) | GTK_STATE_FLAG_ACTIVE);
-  if (page->tab_label)
-    gtk_style_context_add_class (gtk_widget_get_style_context (page->tab_label),
-                                "active-page");
 
   if (!priv->focus_tab ||
       priv->focus_tab->data != (gpointer) priv->cur_page)
@@ -7813,10 +7804,6 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
                         G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
                         notebook);
 
-  if (priv->cur_page == page)
-    gtk_style_context_add_class (gtk_widget_get_style_context (page->tab_label),
-                                "active-page");
-
   if (priv->prelight_tab == page)
     gtk_style_context_add_class (gtk_widget_get_style_context (page->tab_label),
                                  "prelight-page");
index cdd1cce7e0255741668369d5dbb0ac77bcef7824..0a339679899c2c858a805266f2fef65dd3241f27 100644 (file)
@@ -1703,7 +1703,7 @@ column-header.button.dnd { // for treeview-like derive widgets
     &:hover, &.prelight-page {
       border-color: $borders_color;
     }
-    &:active, &.active-page, &:backdrop:active {
+    &:active, &:backdrop:active {
       border-color: $selected_bg_color;
     }
     &:backdrop {
@@ -1721,7 +1721,7 @@ column-header.button.dnd { // for treeview-like derive widgets
           border-#{$_border}-color: $borders_color;
           background-color: transparentize($bg_color,0.8);
         }
-        &:active, &.active-page {
+        &:active {
           background-color: transparentize($bg_color,0.5);
           border-color: transparentize($borders_color,0.5);
           border-#{$_border}-color: $selected_bg_color;
@@ -1753,7 +1753,7 @@ column-header.button.dnd { // for treeview-like derive widgets
         color: mix($backdrop_fg_color, $backdrop_insensitive_color, 50%);
       }
     }
-    .active-page .label, .label.active-page {
+    &:active .label {
       // active tab text
       color: $fg_color;
       &:backdrop { color: $backdrop_fg_color; }
index 3807d15eba5c14c9e1c2aaec4fa31e0409c6377c..e510eb88f63afe14a6df7f6eb5a81d889cd78de2 100644 (file)
@@ -2132,7 +2132,7 @@ column-header .titlebar .button.titlebutton,
       border-left-width: 3px; }
     .notebook tab:hover, .notebook tab.prelight-page {
       border-color: #1c1f1f; }
-    .notebook tab:active, .notebook tab.active-page, .notebook tab:backdrop:active {
+    .notebook tab:active, .notebook tab:backdrop:active {
       border-color: #215d9c; }
     .notebook tab:backdrop {
       background-color: transparent;
@@ -2143,13 +2143,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(28, 31, 31, 0.3);
         border-bottom-color: #1c1f1f;
         background-color: rgba(57, 63, 63, 0.2); }
-      .notebook tab.reorderable-page.top:active, .notebook tab.reorderable-page.top.active-page {
+      .notebook tab.reorderable-page.top:active {
         background-color: rgba(57, 63, 63, 0.5);
         border-color: rgba(28, 31, 31, 0.5);
         border-bottom-color: #215d9c; }
-        .notebook tab.reorderable-page.top:active:hover, .notebook tab.reorderable-page.top.active-page:hover {
+        .notebook tab.reorderable-page.top:active:hover {
           background-color: rgba(57, 63, 63, 0.7); }
-        .notebook tab.reorderable-page.top:active:backdrop, .notebook tab.reorderable-page.top.active-page:backdrop {
+        .notebook tab.reorderable-page.top:active:backdrop {
           border-color: #1e2222;
           background-color: #393f3f;
           border-bottom-color: #215d9c; }
@@ -2162,13 +2162,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(28, 31, 31, 0.3);
         border-top-color: #1c1f1f;
         background-color: rgba(57, 63, 63, 0.2); }
-      .notebook tab.reorderable-page.bottom:active, .notebook tab.reorderable-page.bottom.active-page {
+      .notebook tab.reorderable-page.bottom:active {
         background-color: rgba(57, 63, 63, 0.5);
         border-color: rgba(28, 31, 31, 0.5);
         border-top-color: #215d9c; }
-        .notebook tab.reorderable-page.bottom:active:hover, .notebook tab.reorderable-page.bottom.active-page:hover {
+        .notebook tab.reorderable-page.bottom:active:hover {
           background-color: rgba(57, 63, 63, 0.7); }
-        .notebook tab.reorderable-page.bottom:active:backdrop, .notebook tab.reorderable-page.bottom.active-page:backdrop {
+        .notebook tab.reorderable-page.bottom:active:backdrop {
           border-color: #1e2222;
           background-color: #393f3f;
           border-top-color: #215d9c; }
@@ -2181,13 +2181,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(28, 31, 31, 0.3);
         border-right-color: #1c1f1f;
         background-color: rgba(57, 63, 63, 0.2); }
-      .notebook tab.reorderable-page.left:active, .notebook tab.reorderable-page.left.active-page {
+      .notebook tab.reorderable-page.left:active {
         background-color: rgba(57, 63, 63, 0.5);
         border-color: rgba(28, 31, 31, 0.5);
         border-right-color: #215d9c; }
-        .notebook tab.reorderable-page.left:active:hover, .notebook tab.reorderable-page.left.active-page:hover {
+        .notebook tab.reorderable-page.left:active:hover {
           background-color: rgba(57, 63, 63, 0.7); }
-        .notebook tab.reorderable-page.left:active:backdrop, .notebook tab.reorderable-page.left.active-page:backdrop {
+        .notebook tab.reorderable-page.left:active:backdrop {
           border-color: #1e2222;
           background-color: #393f3f;
           border-right-color: #215d9c; }
@@ -2200,13 +2200,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(28, 31, 31, 0.3);
         border-left-color: #1c1f1f;
         background-color: rgba(57, 63, 63, 0.2); }
-      .notebook tab.reorderable-page.right:active, .notebook tab.reorderable-page.right.active-page {
+      .notebook tab.reorderable-page.right:active {
         background-color: rgba(57, 63, 63, 0.5);
         border-color: rgba(28, 31, 31, 0.5);
         border-left-color: #215d9c; }
-        .notebook tab.reorderable-page.right:active:hover, .notebook tab.reorderable-page.right.active-page:hover {
+        .notebook tab.reorderable-page.right:active:hover {
           background-color: rgba(57, 63, 63, 0.7); }
-        .notebook tab.reorderable-page.right:active:backdrop, .notebook tab.reorderable-page.right.active-page:backdrop {
+        .notebook tab.reorderable-page.right:active:backdrop {
           border-color: #1e2222;
           background-color: #393f3f;
           border-left-color: #215d9c; }
@@ -2223,9 +2223,9 @@ column-header .titlebar .button.titlebutton,
       color: #c0c2c0; }
       .notebook tab .prelight-page .label:backdrop, .notebook tab .label.prelight-page:backdrop {
         color: #787e7e; }
-    .notebook tab .active-page .label, .notebook tab .label.active-page {
+    .notebook tab:active .label {
       color: #eeeeec; }
-      .notebook tab .active-page .label:backdrop, .notebook tab .label.active-page:backdrop {
+      .notebook tab:active .label:backdrop {
         color: #939695; }
     .notebook tab .button, .notebook tab .header-bar .button.titlebutton, .header-bar .notebook tab .button.titlebutton,
     .notebook tab .titlebar .button.titlebutton,
index ef957950f8a68d68f987a418fed6669ea043e4e8..6d47fee18b044361199e6989f821c8084464832f 100644 (file)
@@ -2138,7 +2138,7 @@ column-header .titlebar .button.titlebutton,
       border-left-width: 3px; }
     .notebook tab:hover, .notebook tab.prelight-page {
       border-color: #a1a1a1; }
-    .notebook tab:active, .notebook tab.active-page, .notebook tab:backdrop:active {
+    .notebook tab:active, .notebook tab:backdrop:active {
       border-color: #4a90d9; }
     .notebook tab:backdrop {
       background-color: transparent;
@@ -2149,13 +2149,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(161, 161, 161, 0.3);
         border-bottom-color: #a1a1a1;
         background-color: rgba(237, 237, 237, 0.2); }
-      .notebook tab.reorderable-page.top:active, .notebook tab.reorderable-page.top.active-page {
+      .notebook tab.reorderable-page.top:active {
         background-color: rgba(237, 237, 237, 0.5);
         border-color: rgba(161, 161, 161, 0.5);
         border-bottom-color: #4a90d9; }
-        .notebook tab.reorderable-page.top:active:hover, .notebook tab.reorderable-page.top.active-page:hover {
+        .notebook tab.reorderable-page.top:active:hover {
           background-color: rgba(237, 237, 237, 0.7); }
-        .notebook tab.reorderable-page.top:active:backdrop, .notebook tab.reorderable-page.top.active-page:backdrop {
+        .notebook tab.reorderable-page.top:active:backdrop {
           border-color: #a8a8a8;
           background-color: #ededed;
           border-bottom-color: #4a90d9; }
@@ -2168,13 +2168,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(161, 161, 161, 0.3);
         border-top-color: #a1a1a1;
         background-color: rgba(237, 237, 237, 0.2); }
-      .notebook tab.reorderable-page.bottom:active, .notebook tab.reorderable-page.bottom.active-page {
+      .notebook tab.reorderable-page.bottom:active {
         background-color: rgba(237, 237, 237, 0.5);
         border-color: rgba(161, 161, 161, 0.5);
         border-top-color: #4a90d9; }
-        .notebook tab.reorderable-page.bottom:active:hover, .notebook tab.reorderable-page.bottom.active-page:hover {
+        .notebook tab.reorderable-page.bottom:active:hover {
           background-color: rgba(237, 237, 237, 0.7); }
-        .notebook tab.reorderable-page.bottom:active:backdrop, .notebook tab.reorderable-page.bottom.active-page:backdrop {
+        .notebook tab.reorderable-page.bottom:active:backdrop {
           border-color: #a8a8a8;
           background-color: #ededed;
           border-top-color: #4a90d9; }
@@ -2187,13 +2187,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(161, 161, 161, 0.3);
         border-right-color: #a1a1a1;
         background-color: rgba(237, 237, 237, 0.2); }
-      .notebook tab.reorderable-page.left:active, .notebook tab.reorderable-page.left.active-page {
+      .notebook tab.reorderable-page.left:active {
         background-color: rgba(237, 237, 237, 0.5);
         border-color: rgba(161, 161, 161, 0.5);
         border-right-color: #4a90d9; }
-        .notebook tab.reorderable-page.left:active:hover, .notebook tab.reorderable-page.left.active-page:hover {
+        .notebook tab.reorderable-page.left:active:hover {
           background-color: rgba(237, 237, 237, 0.7); }
-        .notebook tab.reorderable-page.left:active:backdrop, .notebook tab.reorderable-page.left.active-page:backdrop {
+        .notebook tab.reorderable-page.left:active:backdrop {
           border-color: #a8a8a8;
           background-color: #ededed;
           border-right-color: #4a90d9; }
@@ -2206,13 +2206,13 @@ column-header .titlebar .button.titlebutton,
         border-color: rgba(161, 161, 161, 0.3);
         border-left-color: #a1a1a1;
         background-color: rgba(237, 237, 237, 0.2); }
-      .notebook tab.reorderable-page.right:active, .notebook tab.reorderable-page.right.active-page {
+      .notebook tab.reorderable-page.right:active {
         background-color: rgba(237, 237, 237, 0.5);
         border-color: rgba(161, 161, 161, 0.5);
         border-left-color: #4a90d9; }
-        .notebook tab.reorderable-page.right:active:hover, .notebook tab.reorderable-page.right.active-page:hover {
+        .notebook tab.reorderable-page.right:active:hover {
           background-color: rgba(237, 237, 237, 0.7); }
-        .notebook tab.reorderable-page.right:active:backdrop, .notebook tab.reorderable-page.right.active-page:backdrop {
+        .notebook tab.reorderable-page.right:active:backdrop {
           border-color: #a8a8a8;
           background-color: #ededed;
           border-left-color: #4a90d9; }
@@ -2229,9 +2229,9 @@ column-header .titlebar .button.titlebutton,
       color: #5d6263; }
       .notebook tab .prelight-page .label:backdrop, .notebook tab .label.prelight-page:backdrop {
         color: #aaabac; }
-    .notebook tab .active-page .label, .notebook tab .label.active-page {
+    .notebook tab:active .label {
       color: #2e3436; }
-      .notebook tab .active-page .label:backdrop, .notebook tab .label.active-page:backdrop {
+      .notebook tab:active .label:backdrop {
         color: #8d9091; }
     .notebook tab .button, .notebook tab .header-bar .button.titlebutton, .header-bar .notebook tab .button.titlebutton,
     .notebook tab .titlebar .button.titlebutton,
index edd97638893793305a52c207ce6ef12613075112..b755856a73b6d6a2f82ba2a86e06368a0b88d9ae 100644 (file)
@@ -1380,7 +1380,7 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
     &:hover, &.prelight-page {
       border-color: $borders_color;
     }
-    &:active, &.active-page, &:backdrop:active {
+    &:active, &:backdrop:active {
       border-color: $selected_bg_color;
     }
     &:backdrop {
@@ -1398,7 +1398,7 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
           border-#{$_border}-color: $borders_color;
           background-color: transparentize($bg_color,0.8);
         }
-        &:active, &.active-page {
+        &:active {
           background-color: transparentize($bg_color,0.5);
           border-color: transparentize($borders_color,0.5);
           border-#{$_border}-color: $selected_bg_color;
@@ -1427,7 +1427,7 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
       // prelight tab text
       color: mix($fg_color, $insensitive_fg_color, 50%);
     }
-    &.active-page GtkLabel, GtkLabel.active-page {
+    &:active GtkLabel {
       // active tab text
       color: $fg_color;
       &:backdrop { color: $backdrop_fg_color; }
index af2b81a43375b1c1ac1dca1478e96f73737c9ef3..d9720a1ee99d8b8d051534de285a7d2a3891a17a 100644 (file)
@@ -1523,7 +1523,7 @@ GtkTreeView.view.progressbar {
       border-left-width: 3px; }
     .notebook tab:hover, .notebook tab.prelight-page {
       border-color: #7f7f7f; }
-    .notebook tab:active, .notebook tab.active-page, .notebook tab:backdrop:active {
+    .notebook tab:active, .notebook tab:backdrop:active {
       border-color: #000; }
     .notebook tab:backdrop {
       background-color: transparent;
@@ -1534,13 +1534,13 @@ GtkTreeView.view.progressbar {
         border-color: rgba(127, 127, 127, 0.3);
         border-bottom-color: #7f7f7f;
         background-color: rgba(255, 255, 255, 0.2); }
-      .notebook tab.reorderable-page.top:active, .notebook tab.reorderable-page.top.active-page {
+      .notebook tab.reorderable-page.top:active {
         background-color: rgba(255, 255, 255, 0.5);
         border-color: rgba(127, 127, 127, 0.5);
         border-bottom-color: #000; }
-        .notebook tab.reorderable-page.top:active:hover, .notebook tab.reorderable-page.top.active-page:hover {
+        .notebook tab.reorderable-page.top:active:hover {
           background-color: rgba(255, 255, 255, 0.7); }
-        .notebook tab.reorderable-page.top:active:backdrop, .notebook tab.reorderable-page.top.active-page:backdrop {
+        .notebook tab.reorderable-page.top:active:backdrop {
           border-color: #8b8b8b;
           background-color: #fff;
           border-bottom-color: #000; }
@@ -1553,13 +1553,13 @@ GtkTreeView.view.progressbar {
         border-color: rgba(127, 127, 127, 0.3);
         border-top-color: #7f7f7f;
         background-color: rgba(255, 255, 255, 0.2); }
-      .notebook tab.reorderable-page.bottom:active, .notebook tab.reorderable-page.bottom.active-page {
+      .notebook tab.reorderable-page.bottom:active {
         background-color: rgba(255, 255, 255, 0.5);
         border-color: rgba(127, 127, 127, 0.5);
         border-top-color: #000; }
-        .notebook tab.reorderable-page.bottom:active:hover, .notebook tab.reorderable-page.bottom.active-page:hover {
+        .notebook tab.reorderable-page.bottom:active:hover {
           background-color: rgba(255, 255, 255, 0.7); }
-        .notebook tab.reorderable-page.bottom:active:backdrop, .notebook tab.reorderable-page.bottom.active-page:backdrop {
+        .notebook tab.reorderable-page.bottom:active:backdrop {
           border-color: #8b8b8b;
           background-color: #fff;
           border-top-color: #000; }
@@ -1572,13 +1572,13 @@ GtkTreeView.view.progressbar {
         border-color: rgba(127, 127, 127, 0.3);
         border-right-color: #7f7f7f;
         background-color: rgba(255, 255, 255, 0.2); }
-      .notebook tab.reorderable-page.left:active, .notebook tab.reorderable-page.left.active-page {
+      .notebook tab.reorderable-page.left:active {
         background-color: rgba(255, 255, 255, 0.5);
         border-color: rgba(127, 127, 127, 0.5);
         border-right-color: #000; }
-        .notebook tab.reorderable-page.left:active:hover, .notebook tab.reorderable-page.left.active-page:hover {
+        .notebook tab.reorderable-page.left:active:hover {
           background-color: rgba(255, 255, 255, 0.7); }
-        .notebook tab.reorderable-page.left:active:backdrop, .notebook tab.reorderable-page.left.active-page:backdrop {
+        .notebook tab.reorderable-page.left:active:backdrop {
           border-color: #8b8b8b;
           background-color: #fff;
           border-right-color: #000; }
@@ -1591,13 +1591,13 @@ GtkTreeView.view.progressbar {
         border-color: rgba(127, 127, 127, 0.3);
         border-left-color: #7f7f7f;
         background-color: rgba(255, 255, 255, 0.2); }
-      .notebook tab.reorderable-page.right:active, .notebook tab.reorderable-page.right.active-page {
+      .notebook tab.reorderable-page.right:active {
         background-color: rgba(255, 255, 255, 0.5);
         border-color: rgba(127, 127, 127, 0.5);
         border-left-color: #000; }
-        .notebook tab.reorderable-page.right:active:hover, .notebook tab.reorderable-page.right.active-page:hover {
+        .notebook tab.reorderable-page.right:active:hover {
           background-color: rgba(255, 255, 255, 0.7); }
-        .notebook tab.reorderable-page.right:active:backdrop, .notebook tab.reorderable-page.right.active-page:backdrop {
+        .notebook tab.reorderable-page.right:active:backdrop {
           border-color: #8b8b8b;
           background-color: #fff;
           border-left-color: #000; }
@@ -1613,9 +1613,9 @@ GtkTreeView.view.progressbar {
         color: #7f7f7f; }
     .notebook tab.prelight-page GtkLabel, .notebook tab GtkLabel.prelight-page {
       color: #3f3f3f; }
-    .notebook tab.active-page GtkLabel, .notebook tab GtkLabel.active-page {
+    .notebook tab:active GtkLabel {
       color: #000; }
-      .notebook tab.active-page GtkLabel:backdrop, .notebook tab GtkLabel.active-page:backdrop {
+      .notebook tab:active GtkLabel:backdrop {
         color: #000; }
     .notebook tab .button {
       border: 2px solid transparent;